Read Range
AutomatR.DefaultActivities.WorkBook.ReadRange
The "Read Range" activity in AutomatR is part of the WorkBook activities package, facilitating the extraction of values from a specified Excel range and storing them in a DataTable variable. This activity enhances data handling capabilities in automation workflows.
Properties
| Name | Description |
|---|---|
| Input | |
| Excel File Path | Specifies the full path of the workbook on the local drive, including the filename (e.g., "C:\excelActivities\workbook.xlsx"). String variables containing the path. |
| Include Headers | When enabled, considers the first row as the header in the mentioned range of cells. Boolean variables to determine header inclusion. |
| Password | Specifies the password for the workbook if required. Object variables containing the password. |
| Range | Specifies the range to read and use for further operations. String variables containing the range (e.g., "A1:B10"). |
| Sheet Name | Specifies the name of the spreadsheet in which you want to perform the action. String variables containing the sheet name. |
| Misc | |
| Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
| Optional | |
| Delay | Specifies the amount of time (in seconds) to wait before executing the "Read Range" activity. Useful for handling synchronization issues. Integer variables containing the delay duration (e.g., 5 seconds). |
| Output | |
| Result | Stores the data extracted from the specified range in a DataTable variable. DataTable variables to store the extracted data. |
How to use:
- Drag and drop the "Read Range" activity onto the workflow.
- Configure the properties by specifying the Excel file path, sheet name, range, and other optional parameters.
- Optionally, configure the delay for synchronization and customize other settings.
- Execute the workflow to read the specified range in the Excel workbook and store the data in a DataTable variable.
Example: Consider an example where the "Read Range" activity is used to read data from cells A1 to B10 in the "Sheet1" of the workbook "workbook.xlsx":
Read Range:
Excel File Path: "C:\excelActivities\workbook.xlsx"
Sheet Name: "Sheet1"
Range: "A1:B10"
Include Headers: True
Delay: 5
Password: "your_password"
Result: ExcelData
In this example, the activity reads the specified range, including headers, from the "Sheet1" of the workbook and stores the data in the DataTable variable "ExcelData" for further processing.